package com.factory.iamp.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Role {
    private int rid;
    private String name;
    private boolean Register;
    private boolean resetPassword;
    private boolean deleteGroup;
    private boolean makeGroup;
    private boolean alterGroup;
    private boolean addRole;
    private boolean deleteRole;
    private boolean buildRoleUser;
    private boolean addTableTemplateHeader;
    private boolean deleteTableTemplateHeader;
    private boolean addTableTemplateBody;
    private boolean deleteTableTemplateBody;
    private boolean addTableTemplateTail;
    private boolean deleteTableTemplateTail;
    private boolean zcheckTableContent;
    private boolean addTableContentProblem;
    private boolean archiveTable;
    private boolean deleteUser;
    private boolean deleteTableContentSign;
    private boolean findQuestionRecord;
    private boolean addQuestionRecord;
    private boolean alterQuestionRecord;
    private boolean deleteQuestionRecord;
    private boolean deleteAssemblyTable;
    private boolean addLine;
    private boolean deleteLine;

    public Object ReflectGet(String apiName) throws Exception {
        return this.getClass().getDeclaredField(apiName).get(this);
    }

    public boolean getDeleteTableContentSign() {
        return this.deleteTableContentSign;
    }

    public boolean getDeleteAssemblyTable() {
        return this.deleteAssemblyTable;
    }
}
